-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SSE-C source decryption handling #6671
Conversation
Similarly, with a little bigger file lets say 3mb, we can reproduce this
|
Without this fix we have room for two different type of errors. - Source is encrypted and we didn't provide any source encryption keys This results in Incomplete body error to be returned back to the client since source is encrypted and we gave the reader as is to the object layer which was of a decrypted value leading to "IncompleteBody" - Source is not encrypted and we provided source encryption keys. This results in a corrupted object on the destination which is considered encrypted but cannot be read by the server and returns the following error. ``` <Error><Code>XMinioObjectTampered</Code><Message>The requested object was modified and may be compromised</Message><Resource>/id-platform-gamma/ </Resource><RequestId>155EDC3E86BFD4DA</RequestId><HostId>3L137</HostId> </Error> ```
7a55eb1
to
e1b32d7
Compare
@harshavardhana Can you re-run CI? Failures again probably not related... |
Codecov Report
@@ Coverage Diff @@
## master #6671 +/- ##
==========================================
- Coverage 54.98% 54.94% -0.04%
==========================================
Files 259 259
Lines 41317 41326 +9
==========================================
- Hits 22718 22708 -10
- Misses 16607 16624 +17
- Partials 1992 1994 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minio-py/minio-go/aws-sdk-java with TLS tests were ran against it
Mint Automation
|
Description
Fix SSE-C source decryption handling
Motivation and Context
Without this fix, we have room for two different type of errors.
This results in Incomplete body error to be returned back to the client
since the source is encrypted and we gave the reader as is to the object
layer which was of a decrypted value leading to "IncompleteBody"
This results in a corrupted object on the destination which is
considered encrypted but cannot be read by the server and returns
the following error.
Regression
Maybe
How Has This Been Tested?
Using the following example code. To start with let's create an encrypted object and an unencrypted object
Use the following code on the master now if you can see since we are not passing CopySSE keys for an encrypted object, it should throw an error which it does but the error is weird and returns "IncompleteBody" and we can see log messages regarding this. This is the first variation of the bug. There is no destination object that is created. With this PR a proper error is returned requesting proper encryption parameters.
Use the following code on the master now if you can see since we are passing CopySSE keys for an unencrypted object, it should throw an error but it doesn't and we see that destination object gets created nevertheless and we cannot read the object anymore. But with this PR this doesn't happen and we cannot read the object anymore. This is the second variation of the bug.
Types of changes
Checklist:
mint
PR # here: )